import java.io.File;

import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBException;

public class JabxSample {
	public static void main(String[] args) {
		JAXBContext ctx=null;
		Student student = new Student(1000,"qingke","male","20");
		try {
			ctx=JAXBContext.newInstance(Student.class);
			
			ctx.createMarshaller().marshal(student, new File("student.xml"));
			Object obj = ctx.createUnmarshaller().unmarshal(new File("student.xml"));
			System.out.println(obj);
		} catch (JAXBException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
}
